package com.bltec.emergency.service.statisticsService.impl;

import com.bltec.emergency.mapper.ResStatisticsMapper;
import com.bltec.emergency.model.ResStatistics;
import com.bltec.emergency.service.statisticsService.ResStatisticsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class ResStatisticsServiceImpl implements ResStatisticsService {
    @Resource
    private ResStatisticsMapper resStatisticsMapper;
    @Override
    public boolean add(ResStatistics resStatistics) {
        return resStatisticsMapper.insert(resStatistics);
    }

    @Override
    public boolean deleteResStatisticsById(Long id) {
        return resStatisticsMapper.setDisableById(id);
    }

    @Override
    public boolean updateResStatisticsById(ResStatistics resStatistics) {
        return resStatisticsMapper.updateResStatisticsById(resStatistics);
    }

    @Override
    public ResStatistics getResStatisticsById(Long id) {
        return resStatisticsMapper.getResStatisticsById(id);
    }

    @Override
    public List<ResStatistics> getAll() {
        return resStatisticsMapper.selectAll();
    }
}
